package com.example.tse.rbhttpservice.service.goods.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


//import com.rbyair.services.goods.model.GoodsGetVirtualListProducts;
/**
 * 获取虚拟分类二级分类商品列表
 * @author wliu
 * edit tse
 */
public class GoodsGetVirtualListResponse extends RudderResponse{
    
    private List<GoodsGetVirtualListProducts> products = new ArrayList<GoodsGetVirtualListProducts>();
		
	
    /**
     * @return products
     */	
    public List<GoodsGetVirtualListProducts> getProducts() { 
	    return this.products;
    };
	
	/**
     * @return products
     */	
    public void setProducts(List<GoodsGetVirtualListProducts> products) { 
        this.products = products;
    };
    
	
        
    private static void filterFor(GoodsGetVirtualListProducts goods) {
        if (goods.getProductId() == null) {
            goods.setProductId("");
        }
        if (goods.getPrice() == null) {
            goods.setPrice("");
        }
        if (goods.getMktprice() == null) {
            goods.setMktprice("");
        }
        if (goods.getQuantity() == null) {
            goods.setQuantity("");
        }
        if (goods.getName() == null) {
            goods.setName("");
        }
        if (goods.getThumbnailPic() == null) {
            goods.setThumbnailPic("");
        }
        if (goods.getBn() == null) {
            goods.setBn("");
        }
        if (goods.getBuyerNum() == null) {
            goods.setBuyerNum("");
        }
    }
        
    public static void filter(GoodsGetVirtualListResponse goods) {
        if (goods.getProducts() == null) {
            goods.setProducts(new ArrayList<GoodsGetVirtualListProducts>());
        } else {
            for (GoodsGetVirtualListProducts item : goods.getProducts()) {
                filterFor(item);
            }
        }
    }
}
